<template>
  <div>
    <h3>Counter 组件 --- {{count}}</h3>
    <button @click="add">+1</button>
    <br>
    <input type="text" ref="txt">
  </div>
</template>

<script>
export default {
  name: 'Counter',
  data() {
    return {
      count: 0
    }
  },
  methods: {
    add() {
      this.count += 1
    }
  }
}
</script>

<style lang="less" scoped>
</style>
